#ifndef __KXTJ3_DRIVER_H__
#define __KXTJ3_DRIVER_H__


#define KXTJ3_ADDR                      (0x0E)

#define KXTJ3_XOUT_L                    (0x06)
#define KXTJ3_XOUT_H                    (0x07)
#define KXTJ3_YOUT_L                    (0x08)
#define KXTJ3_YOUT_H                    (0x09)
#define KXTJ3_ZOUT_L                    (0x0A)
#define KXTJ3_ZOUT_H                    (0x0B)

#define KXTJ3_DCST_RESP                 (0x0C)

#define KXTJ3_WHO_AM_I                  (0x0F)

#define KXTJ3_INT_SOURCE1               (0x16)
#define KXTJ3_INT_SOURCE2               (0x17)

#define KXTJ3_STATUS_REG                (0x18)

#define KXTJ3_INT_REL                   (0x1A)


////////////////////////////////////////////////
#define KXTJ3_CTRL_REG1                 (0x1B)
#define KXTJ3_CTRL_REG2                 (0x1D)

#define KXTJ3_INT_CTRL_REG1             (0x1E)
#define KXTJ3_INT_CTRL_REG2             (0x1F)

#define KXTJ3_DATA_CTRL_REG             (0x21)

#define KXTJ3_WAKEUP_COUNTER            (0x29)
#define KXTJ3_NA_COUNTER                (0x2A)


#define KXTJ3_SELF_TEST                 (0x3A)

#define KXTJ3_WAKEUP_THRESHOLD_H        (0x6A)
#define KXTJ3_WAKEUP_THRESHOLD_L        (0x6B)




#define APP_KXTJ_INT_PIN        APP_IO_PIN_2



void kxrj3_init(void);

void kxtj3_irq_callback(void);

void kxrj3_loop(void);

#endif


